package com.simon.resourcestatistics.model;

 
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.springframework.data.annotation.CreatedDate;
import lombok.Data;
 
@Data
@Entity
@Table
public class Statistics {
    //每天每个资源室插入当天使用人次
    //（通过数据库的计划任务完成，也可以通过任务调度完成）
    @Id
    @GeneratedValue
    private Integer id;//主键
    @ManyToOne(targetEntity = ReadRoom.class)
    private ReadRoom readRoom;
    @CreatedDate
    private Date day;
    private Integer num;//使用人次
}